package it.irondev.appturismo.service.impl;

import it.irondev.appturismo.dao.LanguageMapper;
import it.irondev.appturismo.entity.Language;
import it.irondev.appturismo.service.ILanguageService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class LanguageServiceImpl implements ILanguageService {

	@Autowired
	LanguageMapper languageDao;
	
	
	public List<Language> getAllLanguages() {
		return languageDao.selectByExample(null);
	}

	public Language getLanguageById(Integer idLanguage) {
		return languageDao.selectByPrimaryKey(idLanguage);
	}

	public Language getLanguageByPrefix(String prefix) {
		return languageDao.selectByPrefix(prefix);
	}

}
